import * as React from 'react'
import * as Loadable from 'react-loadable'
import { Spin } from 'antd'
const loading = ({ isLoading, error }: any): any => {
  if (isLoading) {
    return <Spin size="large" style={{ width: "100%", margin: "40px 0" }} />
  }
  else if (error) {
    return <div>这个页面出问题了。。。</div>
  }
  else {
    return null
  }
}
//按需加载页面
//登录页
const Login = Loadable({ loader: () => import('../views/login/LoginContainer'), loading: loading })
const Index = Loadable({ loader: () => import('../layout/indexLayout/IndexLayout'), loading: loading })
const Thdemand = Loadable({ loader: () => import('../views/thdemand/ThdemandContainer'), loading: loading })
const ThdemandInfo = Loadable({ loader: () => import('../views/thdemand/ThdemandInfoContainer'), loading: loading })
const ThdemandUpload = Loadable({ loader: () => import('../views/thdemand/ThdemandUploadContainer'), loading: loading })
const SupplierInfo = Loadable({ loader: () => import('../views/supplierInfo/SupplierInfoContainer'), loading: loading })
const Band = Loadable({ loader: () => import('../views/band/BandContainer'), loading: loading })
const BandForm = Loadable({ loader: () => import('../views/band/BandFormContainer'), loading: loading })
const Parameter = Loadable({ loader: () => import('../layout/parameterLayout/ParameterLayout'), loading: loading })
const TypeParam = Loadable({ loader: () => import('../views/parameter/typeParam/TypeParamContainer'), loading: loading })
const ColorParam = Loadable({ loader: () => import('../views/parameter/colorParam/ColorParamContainer'), loading: loading })
const SeasonParam = Loadable({ loader: () => import('../views/parameter/seasonParam/SeasonParamContainer'), loading: loading })
const SizeParam = Loadable({ loader: () => import('../views/parameter/sizeParam/SizeParamContainer'), loading: loading })
const ShopgradeParam = Loadable({ loader: () => import('../views/parameter/shopgradeParam/ShopgradeParamContainer'), loading: loading })
const SupplierStyle = Loadable({ loader: () => import('../views/parameter/supplierStyle/SupplierStyleContainer'), loading: loading })
const Fabric = Loadable({ loader: () => import('../views/parameter/fabric/FabricContainer'), loading: loading })
const DataPermission = Loadable({ loader: () => import('../views/parameter/dataPermission/DataPermissionContainer'), loading: loading })
const TypeParamForm = Loadable({ loader: () => import('../views/parameter/typeParam/TypeParamFormContainer'), loading: loading })
const ColorParamForm = Loadable({ loader: () => import('../views/parameter/colorParam/ColorParamFormContainer'), loading: loading })
const SeasonParamForm = Loadable({ loader: () => import('../views/parameter/seasonParam/SeasonParamFormContainer'), loading: loading })
const SizeParamForm = Loadable({ loader: () => import('../views/parameter/sizeParam/SizeParamFormContainer'), loading: loading })
const ShopgradeParamForm = Loadable({ loader: () => import('../views/parameter/shopgradeParam/ShopgradeParamFormContainer'), loading: loading })
const SupplierStyleForm = Loadable({ loader: () => import('../views/parameter/supplierStyle/SupplierStyleFormContainer'), loading: loading })
const FabricForm = Loadable({ loader: () => import('../views/parameter/fabric/FabricFormContainer'), loading: loading })
const DataPermissionForm = Loadable({ loader: () => import('../views/parameter/dataPermission/DataPermissionFormContainer'), loading: loading })
const NewInfo = Loadable({ loader: () => import('../views/newInfo/NewInfoContainer'), loading: loading })
const Apply = Loadable({ loader: () => import('../views/apply/ApplyContainer'), loading: loading })
const ApplyDetail = Loadable({ loader: () => import('../views/apply/ApplyDetailContainer'), loading: loading })
const Primary = Loadable({ loader: () => import('../views/primary/PrimaryContainer'), loading: loading })
const PrimaryForm = Loadable({ loader: () => import('../views/primary/PrimaryFormContainer'), loading: loading })
const Eliminate = Loadable({ loader: () => import('../views/eliminate/EliminateContainer'), loading: loading })
const SecondInstance = Loadable({ loader: () => import('../views/secondInstance/SecondInstanceContainer'), loading: loading })
const SecondInstanceDetail = Loadable({ loader: () => import('../views/secondInstance/SecondInstanceDetailContainer'), loading: loading })
const Order = Loadable({ loader: () => import('../views/order/OrderContainer'), loading: loading })
const OrderDetail = Loadable({ loader: () => import('../views/order/OrderDetailContainer'), loading: loading })
const TakeOrder = Loadable({ loader: () => import('../views/takeOrder/TakeOrderContainer'), loading: loading })
const TakeOrderDetail = Loadable({ loader: () => import('../views/takeOrder/TakeOrderDetailContainer'), loading: loading })
const ReturnOrder = Loadable({ loader: () => import('../views/returnOrder/ReturnOrderContainer'), loading: loading })
const ReturnOrderDetail = Loadable({ loader: () => import('../views/returnOrder/ReturnOrderDetailContainer'), loading: loading })
const DebitOrder = Loadable({ loader: () => import('../views/debitOrder/DebitOrderContainer'), loading: loading })
const DebitOrderDetail = Loadable({ loader: () => import('../views/debitOrder/DebitOrderDetailContainer'), loading: loading })
const Ckphoto = Loadable({ loader: () => import('../views/ckphoto/CkphotoContainer'), loading: loading })
const CkphotoDetail = Loadable({ loader: () => import('../views/ckphoto/CkphotoDetailContainer'), loading: loading })
const Push = Loadable({ loader: () => import('../views/push/PushContainer'), loading: loading })
const Audition = Loadable({ loader: () => import('../views/audition/AuditionContainer'), loading: loading })
const Resolve = Loadable({ loader: () => import('../views/resolve/ResolveContainer'), loading: loading })
const ResolveDetail = Loadable({ loader: () => import('../views/resolve/ResolveDetailContainer'), loading: loading })
const BuyerConfrim = Loadable({ loader: () => import('../views/buyerConfirm/BuyerConfirmContainer'), loading: loading })
const BuyerConfrimList = Loadable({ loader: () => import('../views/buyerConfirm/ListContainer'), loading: loading })
const TakeGoods = Loadable({ loader: () => import('../views/takeGoods/TakeGoodsContainer'), loading: loading })
const TakeGoodsDetail = Loadable({ loader: () => import('../views/takeGoods/TakeGoodsDetailContainer'), loading: loading })
const OneCheck = Loadable({ loader: () => import('../views/oneCheck/OneCheckContainer'), loading: loading })
const OneCheckDetail = Loadable({ loader: () => import('../views/oneCheck/OneCheckDetailContainer'), loading: loading })
const OneResolve = Loadable({ loader: () => import('../views/oneResolve/OneResolveContainer'), loading: loading })
const OneResolveDetail = Loadable({ loader: () => import('../views/oneResolve/OneResolveDetailContainer'), loading: loading })
const Out = Loadable({ loader: () => import('../views/out/OutContainer'), loading: loading })
const OutDetail = Loadable({ loader: () => import('../views/out/OutDetailContainer'), loading: loading })
const CheckStyle = Loadable({ loader: () => import('../views/checkStyle/CheckStyleContainer'), loading: loading })
const DataCheck = Loadable({ loader: () => import('../views/dataCheck/DataCheckContainer'), loading: loading })
const DataCheckdETAIL = Loadable({ loader: () => import('../views/dataCheck/DataCheckDetailContainer'), loading: loading })
const SecordSubmit = Loadable({ loader: () => import('../views/secordSubmit/SecordSubmitContainer'), loading: loading })
const SecordSubmitDetail = Loadable({ loader: () => import('../views/secordSubmit/SecordSubmitDetailContainer'), loading: loading })

export {
  Login,
  Index,
  Thdemand,
  ThdemandInfo,
  ThdemandUpload,
  SupplierInfo,
  Band,
  BandForm,
  Parameter,
  TypeParam,
  ColorParam,
  SeasonParam,
  SizeParam,
  ShopgradeParam,
  SupplierStyle,
  Fabric,
  DataPermission,
  TypeParamForm,
  ColorParamForm,
  SeasonParamForm,
  SizeParamForm,
  ShopgradeParamForm,
  SupplierStyleForm,
  FabricForm,
  DataPermissionForm,
  NewInfo,
  Apply,
  ApplyDetail,
  Primary,
  PrimaryForm,
  Eliminate,
  SecondInstance,
  SecondInstanceDetail,
  Order,
  OrderDetail,
  TakeOrder,
  TakeOrderDetail,
  ReturnOrder,
  ReturnOrderDetail,
  DebitOrder,
  DebitOrderDetail,
  Ckphoto,
  CkphotoDetail,
  Push,
  Audition,
  Resolve,
  ResolveDetail,
  BuyerConfrim,
  BuyerConfrimList,
  TakeGoods,
  OneCheckDetail,
  TakeGoodsDetail,
  OneCheck,
  OneResolve,
  OneResolveDetail,
  Out,
  OutDetail,
  CheckStyle,
  DataCheck,
  DataCheckdETAIL,
  SecordSubmit,
  SecordSubmitDetail
}